package org.array;

import java.util.Arrays;
import java.util.Stack;

public class Main {
    public static void main(String[] args) {

        ArrayList<Integer> arrayList = new ArrayList<Integer>();
        arrayList.add(1);
        arrayList.add(2);
        arrayList.add(3);
        arrayList.add(4);
        arrayList.add(5);
        arrayList.add(6);
        arrayList.add(7);
        arrayList.add(8);
        arrayList.add(9);
        arrayList.add(10);
        arrayList.remove(0);

        arrayList.contains(1);

        arrayList.clear();
        System.out.println(arrayList.toString());
       
        java.util.ArrayList<Double> doublesList = new java.util.ArrayList<>();
        doublesList.add(1.1);
        doublesList.add(1, 1.2);
        doublesList.remove(1);


        Object[] objects = new Object[10];
        objects[2]=2;
        objects[3]=3;
        System.out.println("object.length:" + objects.length);
        objects = Arrays.copyOf(objects, 1000);
        System.out.println(objects.length);
        System.out.println("object.length:" + objects.length);


        Stack<Integer> stack = new Stack<>();
        stack.push(11);
        Integer pop = stack.pop();
        Integer peek = stack.peek();

    }
}
